<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Client
 *
 * @author julien
 */
require_once 'Classes/User.php';
class Client extends User{
    private $firstName;
    private $lastName;
    private $phone;
    private $function;
    private $address;
    private $structure;
    
    public function __construct($arrayOrUsername, $role = 0, $password = null,
                                $firstName="", $lastName="", $phone="", $function="",
                                $address="", $structureID="") {
        
        parent::__construct($arrayOrUsername, $role, $password);
        if(is_array($arrayOrUsername)){
            $this->address = $arrayOrUsername['Address'];
            $this->firstName = $arrayOrUsername['First_Name'];
            $this->function = $arrayOrUsername['Function'];
            $this->lastName = $arrayOrUsername['Last_Name'];
            $this->phone = $arrayOrUsername['Phone'];
        }
        else {
            $this->address = $address;
            $this->firstName = $firstName;
            $this->function = $function;
            $this->lastName = $lastName;
            $this->phone = $phone;
        }
        
        $this->role = ROLE_CLIENT;
        //$this->structure = $structure;
    }
}

?>
